import { BaseWindow } from "../../../component/window/BaseWindow";
import { ILayer } from "../../../mvc/interfaces/ILayer";
import { Language } from "../../../../extend/language/Language";
import { WindowEvent } from "../../../component/window/WindowEvent";
import { Dispatcher } from "../../../mvc/core/Dispatcher";
import { DataEvent } from "../../events/DataEvent";
import { EventName } from "../../mvc/EventName";
import { CrossGuildWarSignUpSubWin } from "./subWin/CrossGuildWarSignUpSubWin";
type int = number;
//class CrossGuildWarSignUpWin
    
    export  class CrossGuildWarSignUpWin extends BaseWindow
    {
        constructor(arg1: ILayer=null)
        {
            super(arg1);
            this.setSize(839, 522);
            this.title = Language.getString(80550);
            this.titleHeight = 27;
            this.addEventListener(WindowEvent.CLOSE, this.onClose);
            this.addEventListener(flash.events.Event.ADDED_TO_STAGE, this.onAdd);
            return;
        }

        /* internal  */onAdd(arg1: Object /* flash.events.Event */): void
        {
            Dispatcher.dispatchEvent(new DataEvent(EventName.CrossGuildWarIsNotice, true));
            Dispatcher.dispatchEvent(new DataEvent(EventName.GuildWarIsNotice, true));
            return;
        }

        /* internal  */onClose(arg1: Object /* flash.events.Event */): void
        {
            Dispatcher.dispatchEvent(new DataEvent(EventName.CrossGuildWarIsNotice, false));
            Dispatcher.dispatchEvent(new DataEvent(EventName.GuildWarIsNotice, false));
            return;
        }

        protected /* override */ createChildren(): void
        {
            super.createChildren();
            this._subWin = new CrossGuildWarSignUpSubWin();
            this._subWin.x = 18;
            this._subWin.y = 40;
            this.addChild(this._subWin);
            return;
        }

        public set signUpEnabled(arg1: Boolean)
        {
            this._subWin.signUpEnabled = arg1;
            return;
        }

        public updateCurHave(arg1: int): void
        {
            this._subWin.updateCurHave(arg1);
            return;
        }

        public updateCurSignUpCount(arg1: int): void
        {
            this._subWin.updateCurSignUpCount(arg1);
            return;
        }

        public updateLeftTime(arg1: int): void
        {
            this._subWin.updateLeftTime(arg1);
            return;
        }

        /* internal */ /* var */_subWin: CrossGuildWarSignUpSubWin;
    }
